<!DOCTYPE html>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }"></c:set>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>CMDB-添加部门</title>
    <link href="${path}/css/style.css" rel="stylesheet" type="text/css">
    <link href="${path}/sys/role_management/add_role.css" rel="stylesheet" type="text/css">
    <link href="${path}/common/plugins/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css">
    <script src="${path}/js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="${path}/js/user_js.js"></script>
    <script src="${path}/common/plugins/bootstrap/js/bootstrap.js"></script>
    <script src="${path}/common/plugins/layer/layer.js"></script>
    <script src="add_dep.js"></script>
</head>
<body>
<input type="hidden" id="depId" value="${depId}" />
<input type="hidden" id="depPid" value="${Dep.depPid}" />
<div class="content_condition oneContent">
    <div class="content_group">
        <div class="span5">
            <label class="control-label">部门名:</label>
            <div class="controls">
                <input id="depName" type="text" value="${Dep.depName}" />
                <span class="redbtn">*</span>
            </div>
        </div>
    </div>
    
    <div class="content_group">
        <div class="span5">
            <label class="control-label">隶属公司:</label>
            <div class="controls">
                <select id="cmpName">
                	<c:forEach items="${sysCompanyList}" var="companyList" varStatus="status">
                		<option cmpId="${companyList.cmpId}" <c:if test="${Dep.cmpId==companyList.cmpId}">selected</c:if> >${companyList.cmpName}</option>
                    </c:forEach>
                </select>
                <span class="redbtn">*</span>
            </div>
        </div>
    </div>
    
    <div class="content_group">
        <div class="span5">
            <label class="control-label">是子部门:</label>
            <div class="controls">
                <select id="isOutDep">
                	<option>是</option>
                    <option <c:if test="${Dep.depPid==null||Dep.depPid == 0 }">selected</c:if> >否</option>
                </select>
                <span class="redbtn">*</span>
            </div>
        </div>
    </div>
    
   
		
		<div class="content_group">
	        <div class="span5">
	            <label class="control-label">父级部门:</label>
	            <div class="controls">
	                <select class="outDep" id="parentDep">
	                	<c:forEach items="${parentDepList}" var="depList" varStatus="status">
	                		<option id=${depList.cmpId} <c:if test="${Dep.depPid==null||Dep.depPid == depList.depId }">selected</c:if> >${depList.depName}</option>
	                    </c:forEach>
	                </select>
	                <select class="outDep" id="nothing">
	                		<option >无</option>
	                </select>
	                <span class="redbtn">*</span>
	            </div>
	        </div>
	    </div>
	
	
    
    
    
    
    
    <div class="content_group">
        <div class="span5">
            <label class="control-label">部门状态:</label>
            <div class="controls">
                <select id="state" name="state">
                		<option <c:if test="${Dep.state==null||Dep.state=='9ba'}">selected</c:if>>启用</option>
                    	<option  <c:if test="${Dep.state=='9bb'}">selected</c:if>>关闭</option>
                </select>
                <span class="redbtn">*</span>
            </div>
        </div>
    </div>
    
    
    
     <div class="last_group">
        <div class="span5">
            <label class="control-label">备注:</label>
            <div class="controls">
                <textarea id="remark" >${Dep.remark}</textarea>
            </div>
        </div>
    </div>
   
</div>
<div class="btn_bottom">
    <div class="spanbtn">
    	<c:if test="${Dep.depName==null}">
       		<button class="press_btn1 Keep"><i class="save top_current"></i>保存</button>
    	</c:if>
    	<c:if test="${Dep.depName!=null}">
       		<button class="press_btn1 Sub"><i class="save top_current"></i>提交</button>
    	</c:if>
        <button class="press_btn2 Close"><i class="del top_current"></i>关闭</button>
    </div>
</div>

</body>
<script type="text/javascript">

</script>
</html>